package ui;

import java.awt.Color;
import java.awt.Font;

import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;
import javax.swing.JButton;

import logic.ACListAdmin;



public class AdminExchangeRate extends JPanel {
	JTextField ExchangeRate;
 


	JButton buttonExchangeConfirm;
	JLabel CurrentRate;
	JLabel NewRate;


	/**
	 * Create the panel.
	 */
	public AdminExchangeRate() {
		
		setBackground(Color.decode("#FFFFFF"));
		setLayout(null);
		
	    ImageIcon adminPanelGradient = new ImageIcon("gfx/adminPanelGradient.png");

		JLabel topPanel = new JLabel(adminPanelGradient);	
		topPanel.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.decode("#CCCCCC")));
		topPanel.setBounds(0, 0, 650, 80);
		
		JLabel panelTitle = new JLabel("ExchangeRate");
		panelTitle.setBounds(10, 35, 650, 50);
		panelTitle.setFont(new Font("Helvetica Neue", Font.PLAIN, 28));

		
		CurrentRate = new JLabel("The current exchange rate is: ");
		CurrentRate.setFont(new Font("Arial", Font.PLAIN, 16));
		CurrentRate.setBounds(185, 200, 250, 20);

		NewRate = new JLabel("New exchange rate");
		NewRate.setFont(new Font("Arial", Font.PLAIN, 16));
		NewRate.setBounds(230, 275, 160, 20);

		ExchangeRate = new JTextField();
		ExchangeRate.setFont(new Font("Arial", Font.PLAIN, 13));
		ExchangeRate.setBounds(225, 300, 200, 30);
		
		buttonExchangeConfirm = new JButton("Confirm");
		buttonExchangeConfirm.setBounds(275,350,100,30);	
		buttonExchangeConfirm.setFont(new Font("Arial", Font.PLAIN, 13));
		buttonExchangeConfirm.setActionCommand("ExchangeConfirm");
		
		add(CurrentRate);
		add(NewRate);
		add(ExchangeRate);
		add(buttonExchangeConfirm);
		
		
		
		
	}


	public void addACList(ACListAdmin ac) {
		buttonExchangeConfirm.addActionListener(ac);
		// TODO Auto-generated method stub
		
	}

}
